package com.kmproject.haifu.mvp.ui.activity;

import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.hankkin.gradationscroll.GradationScrollView;
import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.http.imageloader.ImageLoader;
import com.jess.arms.http.imageloader.glide.ImageConfigImpl;
import com.jess.arms.utils.ArmsUtils;
import com.jess.arms.utils.DataHelper;
import com.kmproject.haifu.R;
import com.kmproject.haifu.app.AppConstant;
import com.kmproject.haifu.app.hfinterface.HouseReasonRemovalCallBack;
import com.kmproject.haifu.app.utils.AppUtil;
import com.kmproject.haifu.app.utils.ExtensionUtilKt;
import com.kmproject.haifu.app.utils.TimeUtils;
import com.kmproject.haifu.app.utils.ViewExtensionKt;
import com.kmproject.haifu.di.component.DaggerHouseRentShowInfoComponent;
import com.kmproject.haifu.mvp.contract.HouseRentShowInfoContract;
import com.kmproject.haifu.mvp.model.api.Api;
import com.kmproject.haifu.mvp.model.entity.beans.HousePayWayBean;
import com.kmproject.haifu.mvp.model.entity.beans.HouseRentListShowBean;
import com.kmproject.haifu.mvp.model.entity.beans.HouseRentListShowInfoBean;
import com.kmproject.haifu.mvp.model.entity.beans.MemberCenterUserInfoBean;
import com.kmproject.haifu.mvp.model.entity.resbean.HouseRentShowInfoBean;
import com.kmproject.haifu.mvp.presenter.HouseRentShowInfoPresenter;
import com.kmproject.haifu.mvp.ui.adapter.HouseRentShowInfoAdapter;
import com.kmproject.haifu.mvp.ui.adapter.HouseRentingShowFwpzAdapter;
import com.kmproject.haifu.mvp.ui.adapter.HouseRentingShowHeZuYqItemAdapter;
import com.kmproject.haifu.mvp.ui.holder.BannerViewHolder;
import com.kmproject.haifu.mvp.ui.widget.CircleImageView;
import com.kmproject.haifu.mvp.ui.widget.ExpandableTextView;
import com.kmproject.haifu.mvp.ui.widget.RoundCornerImageView;
import com.library.flowlayout.FlowLayoutManager;
import com.library.flowlayout.SpaceItemDecoration;
import com.like.LikeButton;
import com.like.OnLikeListener;
import com.zhouwei.mzbanner.MZBannerView;
import com.zhouwei.mzbanner.holder.MZHolderCreator;
import com.zhouwei.mzbanner.holder.MZViewHolder;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

import static com.jess.arms.utils.Preconditions.checkNotNull;


/**
 * ================================================
 * Description:
 * <p>
 * Created by MVPArmsTemplate on 07/05/2019 15:58
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
 * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
 * ================================================
 */
public class HouseRentShowInfoActivity extends BaseActivity<HouseRentShowInfoPresenter> implements HouseRentShowInfoContract.View, GradationScrollView.ScrollViewListener {

    @BindView(R.id.activity_house_rent_show_banner)
    MZBannerView activityHouseRentShowBanner;
    @BindView(R.id.activity_house_rent_show_imgNum)
    TextView activityHouseRentShowImgNum;
    @BindView(R.id.activity_house_rent_show_tv1)
    TextView activityHouseRentShowTv1;
    @BindView(R.id.activity_house_rent_show_tv2)
    TextView activityHouseRentShowTv2;
    @BindView(R.id.activity_house_rent_show_tv3)
    TextView activityHouseRentShowTv3;
    @BindView(R.id.activity_house_rent_show_tv4)
    TextView activityHouseRentShowTv4;
    @BindView(R.id.activity_house_rent_show_jb_img)
    ImageView activityHouseRentShowJbImg;
    @BindView(R.id.activity_house_rent_show_jb_lay)
    LinearLayout activityHouseRentShowJbLay;
    @BindView(R.id.activity_house_rent_show_RecyclerView1)
    RecyclerView activityHouseRentShowRecyclerView1;
    @BindView(R.id.activity_house_rent_show_tv5)
    TextView activityHouseRentShowTv5;
    @BindView(R.id.activity_house_rent_show_tv6)
    TextView activityHouseRentShowTv6;
    @BindView(R.id.activity_house_rent_show_address_img)
    ImageView activityHouseRentShowAddressImg;
    @BindView(R.id.activity_house_rent_show_RecyclerView2)
    RecyclerView activityHouseRentShowRecyclerView2;
    @BindView(R.id.activity_house_rent_show_RecyclerView3)
    RecyclerView activityHouseRentShowRecyclerView3;
    @BindView(R.id.activity_house_rent_show_ExpandableTextView7)
    ExpandableTextView activityHouseRentShowExpandableTextView7;
    @BindView(R.id.activity_house_rent_show_header_img)
    CircleImageView activityHouseRentShowHeaderImg;
    @BindView(R.id.activity_house_rent_show_tv7)
    TextView activityHouseRentShowTv7;

    @BindView(R.id.activity_house_rent_show_tv9)
    TextView activityHouseRentShowTv9;
    @BindView(R.id.activity_house_rent_show_tv10)
    TextView activityHouseRentShowTv10;

    @BindView(R.id.scrollview)
    GradationScrollView scrollview;
    @BindView(R.id.activity_house_rent_show_btn12)
    LikeButton activityHouseRentShowBtn12;
    @BindView(R.id.activity_house_rent_show_tv13)
    TextView activityHouseRentShowTv13;
    @BindView(R.id.activity_house_rent_show_tv14)
    TextView activityHouseRentShowTv14;
    @BindView(R.id.activity_house_rent_show_info_back)
    ImageView activityHouseRentShowInfoBack;
    @BindView(R.id.activity_house_rent_show_info_share)
    ImageView activityHouseRentShowInfoShare;
    @BindView(R.id.activity_house_rent_show_msg)
    ImageView activityHouseRentShowMsg;
    @BindView(R.id.activity_house_rent_show_infoTitle_lay)
    LinearLayout activityHouseRentShowInfoTitleLay;


    @BindView(R.id.activity_house_rent_show_tv15)
    TextView activityHouseRentShowTv15;
    @BindView(R.id.activity_house_rent_show_sc_lay)
    LinearLayout activityHouseRentShowScLay;

    @BindView(R.id.activity_house_rent_show_RecyclerView_new)
    RecyclerView activityHouseRentShowRecyclerViewNew;
    @BindView(R.id.activity_house_rent_show_tv17)
    TextView activityHouseRentShowTv17;
    @BindView(R.id.activity_house_rent_show_fwfbz_img)
    ImageView activityHouseRentShowFwfbzImg;
    @BindView(R.id.activity_house_rent_show_fwfbz_txt)
    TextView activityHouseRentShowFwfbzTxt;
    @BindView(R.id.activity_house_rent_show_fwfbz_lay)
    LinearLayout activityHouseRentShowFwfbzLay;
    @BindView(R.id.activity_house_rent_show_tv16)
    TextView activityHouseRentShowTv16;
    @BindView(R.id.activity_house_rent_show_img)
    ImageView activityHouseRentShowImg;
    @BindView(R.id.rl_root_layout)
    RelativeLayout rlRootLayout;
    @BindView(R.id.activity_house_rent_show_lxr_txt)
    TextView activityHouseRentShowLxrTxt;
    @BindView(R.id.activity_house_rent_show_wxh_txt)
    TextView activityHouseRentShowWxhTxt;
    @BindView(R.id.activity_house_rent_show_wxh_lay)
    LinearLayout activityHouseRentShowWxhLay;
    @BindView(R.id.activity_house_rent_show_lxdh_txt)
    TextView activityHouseRentShowLxdhTxt;
    @BindView(R.id.activity_house_rent_show_fdxxPublish_lay)
    LinearLayout activityHouseRentShowFdxxPublishLay;
    @BindView(R.id.activity_house_rent_show_fdxx_lay)
    LinearLayout activityHouseRentShowFdxxLay;
    //店铺相关的
    @BindView(R.id.activity_sp_show_header_img)
    RoundCornerImageView activitySpShowHeaderImg;
    @BindView(R.id.activity_sp_name_txt)
    TextView activitySpNameTxt;
    @BindView(R.id.activity_sp_dl_img)
    TextView activitySpDlImg;
    @BindView(R.id.activity_sp_hydj_img)
    ImageView activitySpHydjImg;
    @BindView(R.id.activity_sp_zxfy_img)
    TextView activitySpZxfyImg;
    @BindView(R.id.activity_house_rent_show_sp_lay)
    LinearLayout activityHouseRentShowSpLay;

    @BindView(R.id.house_info_show_fyyxj)
    TextView houseInfoShowFyyxj;
    @BindView(R.id.house_info_show_fywzs)
    TextView houseInfoShowFywzs;
    @BindView(R.id.activity_house_rent_common_lay)
    LinearLayout activityHouseRentCommonLay;
    @BindView(R.id.activity_house_rent_show_time)
    TextView activityHouseRentShowTime;
    @BindView(R.id.activity_house_rent_show_edit)
    TextView activityHouseRentShowEdit;
    @BindView(R.id.activity_house_rent_show_obt)
    TextView activityHouseRentShowObt;
    @BindView(R.id.activity_house_rent_userCenter_lay)
    LinearLayout activityHouseRentUserCenterLay;

    @BindView(R.id.activity_house_rent_commonLook_lay)
    LinearLayout activityHouseRentCommonLookLay;
    @BindView(R.id.activity_house_rent_show_tv2_unit)
    TextView activityHouseRentShowTv2Unit;

    private int imageHeight;
    ImageLoader glideImage;
    private HouseRentListShowInfoBean mhouseRentListShowInfoBean;
    //    private RentSeekingDetail mRentSeekingDetail;
    private View dialogView;
    private AlertDialog dialog;
    private List<HousePayWayBean> mhousePayWayBeansXjTsY;//下架提示语

    @Override
    public void setupActivityComponent(@NonNull AppComponent appComponent) {
        DaggerHouseRentShowInfoComponent //如找不到该类,请编译一下项目
                .builder()
                .appComponent(appComponent)
                .view(this)
                .build()
                .inject(this);
    }

    @Override
    public int initView(@Nullable Bundle savedInstanceState) {
        return R.layout.activity_house_rent_show_info; //如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
    }

    @Override
    public void initData(@Nullable Bundle savedInstanceState) {
        initGlide();
        MemberCenterUserInfoBean memberCenterUserInfoBean = DataHelper.getDeviceData(this, AppConstant.user_memberInfo);
        if (memberCenterUserInfoBean != null) {
            mglideImage.loadImage(this, ImageConfigImpl.builder().url(memberCenterUserInfoBean.getMemberLevel().getHeadImage()).imageRadius(5)
                    .imageView(activityHouseRentShowImg)
                    .build());
        }

        initListeners();
        if (!getIntent().hasExtra("rentId")) {
            showMessage("系统参数异常");
            killMyself();
            return;
        }
        buttomContralShow(null);
        mPresenter.viewHouseRent(getIntent().getStringExtra("rentId"),"0", "0");
        mPresenter.dictList(Api.LOWER_SHELF_REASON, "");//获取下架提示语
    }

    @Override
    public void showLoading() {
        loadingDialog.show();
    }

    @Override
    public void hideLoading() {
        loadingDialog.dismiss();
    }

    @Override
    public void showMessage(@NonNull String message) {
        checkNotNull(message);
        ArmsUtils.snackbarText(message);
    }

    @Override
    public void launchActivity(@NonNull Intent intent) {
        checkNotNull(intent);
        ArmsUtils.startActivity(intent);
    }

    @Override
    public void killMyself() {
        finish();
    }

    /**
     * 获取顶部图片高度后，设置滚动监听
     */
    private void initListeners() {

        ViewTreeObserver vto = activityHouseRentShowBanner.getViewTreeObserver();
        vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                activityHouseRentShowBanner.getViewTreeObserver().removeGlobalOnLayoutListener(
                        this);
                imageHeight = activityHouseRentShowBanner.getHeight();

                scrollview.setScrollViewListener(HouseRentShowInfoActivity.this);
            }
        });
    }

    @Override
    public void onScrollChanged(GradationScrollView scrollView, int x, int y, int oldx, int oldy) {
        // TODO Auto-generated method stub
        if (y <= 0) {   //设置标题的背景颜色
            activityHouseRentShowInfoTitleLay.setBackgroundColor(Color.argb((int) 0, 255, 255, 255));
//            activityHouseRentShowInfoTitleLay.setAlpha(0);
        } else if (y > 0 && y <= imageHeight) { //滑动距离小于banner图的高度时，设置背景和字体颜色颜色透明度渐变
            float scale = (float) y / imageHeight;
            float alpha = (255 * scale);
//            activityHouseRentShowInfoTitleLay.setTextColor(Color.argb((int) alpha, 255, 255, 255));
            activityHouseRentShowInfoTitleLay.setBackgroundColor(Color.argb((int) alpha, 255, 255, 255));
        } else {    //滑动到banner下面设置普通颜色
            activityHouseRentShowInfoTitleLay.setBackgroundColor(Color.argb((int) 255, 255, 255, 255));
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
//        getWindow().requestFeature(Window.FEATURE_NO_TITLE);
//        StatusBarUtil.setImgTransparent(this);
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.activity_house_rent_show_fdxx_lay,R.id.activity_house_rent_show_sp_lay, R.id.activity_house_rent_show_tv1, R.id.activity_house_rent_show_tv2, R.id.activity_house_rent_show_tv3, R.id.activity_house_rent_show_tv4, R.id.activity_house_rent_show_jb_img, R.id.activity_house_rent_show_address_img, R.id.activity_house_rent_show_header_img, R.id.activity_house_rent_show_tv7, R.id.activity_house_rent_show_tv9, R.id.activity_house_rent_show_tv10, R.id.activity_house_rent_show_tv13, R.id.activity_house_rent_show_tv14, R.id.activity_house_rent_show_info_back, R.id.activity_house_rent_show_info_share, R.id.activity_house_rent_show_msg})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.activity_house_rent_show_sp_lay:
                Intent gotoStore = new Intent(this, MyStoreActivity.class);
                gotoStore.putExtra("userStoreId", mhouseRentListShowInfoBean.getUserStoreId());
                gotoStore.putExtra("userId", mhouseRentListShowInfoBean.getUserId());
                ArmsUtils.startActivity(gotoStore);
                break;
            case R.id.activity_house_rent_show_del:
//                的撒大
                //删除
                mPresenter.del(mhouseRentListShowInfoBean.getRentId());
                break;
            case R.id.activity_house_rent_show_tv1:
                break;
            case R.id.activity_house_rent_show_tv2:
                break;
            case R.id.activity_house_rent_show_tv3:
                break;
            case R.id.activity_house_rent_show_tv4:
                break;
            case R.id.activity_house_rent_show_jb_img:
                if (!AppUtil.userIsLogin(this)) {
                    ArmsUtils.makeText(this, "请先登录");
                    ArmsUtils.startActivity(UserLoginActivity.class);
                    return;
                }
                Intent intentReport = new Intent(this, HouseReportActivity.class);
                intentReport.putExtra("rentId", mhouseRentListShowInfoBean.getRentId());
                intentReport.putExtra("reportUserId", mhouseRentListShowInfoBean.getUserId());
                intentReport.putExtra("reportType", "0");

                startActivity(intentReport);
                break;
            case R.id.activity_house_rent_show_address_img:
                //跳转到地图界面
                Intent intent = new Intent(this, MapOneShowActivity.class);
                intent.putExtra("lat", mhouseRentListShowInfoBean.getLat());
                intent.putExtra("lgt", mhouseRentListShowInfoBean.getLgt());
                ArmsUtils.startActivity(intent);
                break;
            case R.id.activity_house_rent_show_header_img:
                break;
            case R.id.activity_house_rent_show_tv7:
                break;

            case R.id.activity_house_rent_show_tv9:
                break;
            case R.id.activity_house_rent_show_tv10:
                break;
            case R.id.activity_house_rent_show_fdxx_lay:
                //跳转到那个用户的个人主页。看他的全部发布
                Intent intent1 = new Intent(this, PersonalHomePageActivity.class);
                intent1.putExtra("userId ", mhouseRentListShowInfoBean.getUserId());
                AppConstant.PHConstant.phUserId = mhouseRentListShowInfoBean.getUserId();
                ArmsUtils.startActivity(intent1);
                break;

            case R.id.activity_house_rent_show_tv13:
                //加微信
                if (mhouseRentListShowInfoBean != null) {
                    if (dialogView == null) {
                        dialogView = ViewExtensionKt.inflate(rlRootLayout, R.layout.v_rent_seeking_show_we_chat, false);
                        ((TextView) dialogView.findViewById(R.id.tv_name)).setText(String.format(getString(R.string.rent_seeking_detail_fm_3), mhouseRentListShowInfoBean.getLandlord()));
                        ((TextView) dialogView.findViewById(R.id.tv_we_chat_number)).setText(mhouseRentListShowInfoBean.getWechatNumber());
                        dialogView.findViewById(R.id.tv_we_copy_we_chat).setOnClickListener(v -> {
                            ExtensionUtilKt.copyText(HouseRentShowInfoActivity.this, mhouseRentListShowInfoBean.getWechatNumber());
                            showMessage("复制成功");
                            dialog.dismiss();
                        });
                    }
                    if (dialog == null) {
                        dialog = new AlertDialog.Builder(this, R.style.dialog1).create();
                    }
                    addWeChat();
                }
                break;
            case R.id.activity_house_rent_show_tv14:
                if (mhouseRentListShowInfoBean == null) {
                    showMessage("未获取到用户信息");
                    return;
                }
                String temPhone = "";
                if ("86".equals(mhouseRentListShowInfoBean.getLandlordMobile().substring(0, 2))) {
                    temPhone = mhouseRentListShowInfoBean.getLandlordMobile().substring(2, mhouseRentListShowInfoBean.getLandlordMobile().length());
                } else {
                    temPhone = mhouseRentListShowInfoBean.getLandlordMobile();
                }
                Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + temPhone));//跳转到拨号界面，同时传递电话号码
                startActivity(dialIntent);
                break;
            case R.id.activity_house_rent_show_info_back:
                killMyself();
                break;
            case R.id.activity_house_rent_show_info_share:
                if (mhouseRentListShowInfoBean.getIsExpired()==1)
                {
                    //已失效
                    showMessage("房源已不存在");
                    return;
                }
//                AppUtil.sharePopuWindow(this, activityHouseRentShowTv14);
                AppUtil.sharePopuWindow(this, activityHouseRentShowTv14,activityHouseRentShowTv1.getText().toString(),"",mhouseRentListShowInfoBean.getDetail(),(mhouseRentListShowInfoBean.getHouseImageList()!=null&&!mhouseRentListShowInfoBean.getHouseImageList().isEmpty())?mhouseRentListShowInfoBean.getHouseImageList().get(0).getImageUrl():"",Api.SHARE_RENT_URL+mhouseRentListShowInfoBean.getRentId());
                break;
            case R.id.activity_house_rent_show_msg:
                AppUtil.gotoMessage(this);
                break;
        }
    }


    @Override
    public void viewHouseRentSuccess(HouseRentListShowInfoBean houseRentListShowInfoBean) {
        if (houseRentListShowInfoBean == null) {
            return;
        }
        showDataInfo(houseRentListShowInfoBean);
        if (houseRentListShowInfoBean.getWechatNumber() != null && !TextUtils.isEmpty(houseRentListShowInfoBean.getWechatNumber())) {
            activityHouseRentShowTv13.setVisibility(View.VISIBLE);
            activityHouseRentShowWxhLay.setVisibility(View.VISIBLE);
        } else {
            activityHouseRentShowTv13.setVisibility(View.INVISIBLE);
            activityHouseRentShowWxhLay.setVisibility(View.GONE);
        }

        activityHouseRentShowLxrTxt.setText(houseRentListShowInfoBean.getLandlord());//联系人
        activityHouseRentShowLxdhTxt.setText("+"+houseRentListShowInfoBean.getLandlordMobile().substring(0,2)+" "+houseRentListShowInfoBean.getLandlordMobile().substring(2,houseRentListShowInfoBean.getLandlordMobile().length()));//联系电话
        activityHouseRentShowWxhTxt.setText(houseRentListShowInfoBean.getWechatNumber());//微信号

        if (houseRentListShowInfoBean.getLandlordGender().equals("男")) {
            activityHouseRentShowFwfbzImg.setImageResource(R.mipmap.house_default_man);
        } else {
            activityHouseRentShowFwfbzImg.setImageResource(R.mipmap.house_default_woman);
        }
        activityHouseRentShowFwfbzTxt.setText(houseRentListShowInfoBean.getLandlord());
        if (houseRentListShowInfoBean.getCollectionStatus() == 0) {
            activityHouseRentShowBtn12.setLiked(false);
        } else {
            activityHouseRentShowBtn12.setLiked(true);
        }
        activityHouseRentShowBtn12.setOnLikeListener(new OnLikeListener() {
            @Override
            public void liked(LikeButton likeButton) {
                if (!AppUtil.userIsLogin(HouseRentShowInfoActivity.this))
                {
                    ArmsUtils.startActivity(UserLoginActivity.class);
                    showMessage("请先登录");
                    return;
                }
                mPresenter.addGz(getIntent().getStringExtra("rentId"));
            }

            @Override
            public void unLiked(LikeButton likeButton) {
                if (!AppUtil.userIsLogin(HouseRentShowInfoActivity.this))
                {
                    ArmsUtils.startActivity(UserLoginActivity.class);
                    showMessage("请先登录");
                    return;
                }
                mPresenter.canlGz(getIntent().getStringExtra("rentId"));
            }
        });
        mhouseRentListShowInfoBean = houseRentListShowInfoBean;
        //整租1  短租3  合租2
        if ("hz".equals(houseRentListShowInfoBean.getRentType())) {
            //合租
            activityHouseRentShowTv1.setText(houseRentListShowInfoBean.getRentTypeName() + "." + houseRentListShowInfoBean.getRoomCountName() + houseRentListShowInfoBean.getDrawingCountName() + houseRentListShowInfoBean.getToiletCountName()+ "." + houseRentListShowInfoBean.getRentRoomName() + "." + houseRentListShowInfoBean.getHouseName() );
            activityHouseRentShowTv2.setText(houseRentListShowInfoBean.getMonthRent().intValue()+"P");
            activityHouseRentShowTv2Unit.setText("/月");
            activityHouseRentShowTv3.setText("（" + houseRentListShowInfoBean.getDayRentName() + "）");
//            activityHouseRentShowNewTv5.setText(houseRentListShowInfoBean.getRentRoomName());
        } else
            //短租和整租
            if ("dz".equals(houseRentListShowInfoBean.getRentType())) {
                //短租
                activityHouseRentShowTv2.setText(houseRentListShowInfoBean.getMonthRent().intValue() + "P");
                activityHouseRentShowTv2Unit.setText("/天");
                activityHouseRentShowTv3.setVisibility(View.GONE);
                activityHouseRentShowTv1.setText(houseRentListShowInfoBean.getRentTypeName() + "." + houseRentListShowInfoBean.getRoomCountName() + houseRentListShowInfoBean.getDrawingCountName() + houseRentListShowInfoBean.getToiletCountName() + "." + houseRentListShowInfoBean.getHouseName());

            } else if ("zz".equals(houseRentListShowInfoBean.getRentType())) {
                //整租
                activityHouseRentShowTv2.setText(houseRentListShowInfoBean.getMonthRent().intValue() + "P");
                activityHouseRentShowTv2Unit.setText("/月");
                activityHouseRentShowTv3.setText("（" + houseRentListShowInfoBean.getDayRentName() + "）");
                activityHouseRentShowTv1.setText(houseRentListShowInfoBean.getRentTypeName() + "." + houseRentListShowInfoBean.getRoomCountName() + houseRentListShowInfoBean.getDrawingCountName() + houseRentListShowInfoBean.getToiletCountName() + "." + houseRentListShowInfoBean.getHouseName());

            } else if ("bs".equals(houseRentListShowInfoBean.getRentType())) {
                //别墅
                activityHouseRentShowTv2.setText(houseRentListShowInfoBean.getMonthRent().intValue() + "P");
                activityHouseRentShowTv2Unit.setText("/月");
                activityHouseRentShowTv3.setText("（" + houseRentListShowInfoBean.getDayRentName() + "）");
                activityHouseRentShowTv1.setText(houseRentListShowInfoBean.getRentTypeName() + "." + houseRentListShowInfoBean.getRoomCountName() + houseRentListShowInfoBean.getDrawingCountName() + houseRentListShowInfoBean.getToiletCountName() + "." + houseRentListShowInfoBean.getHouseName());

            } else {
                //商业用地的
                activityHouseRentShowTv2.setText(houseRentListShowInfoBean.getMonthRent().intValue() + "P");
                activityHouseRentShowTv2Unit.setText("/月");
                activityHouseRentShowTv3.setText("（" + houseRentListShowInfoBean.getDayRentName() + "）");
                activityHouseRentShowTv1.setText(houseRentListShowInfoBean.getHouseName());
            }

        activityHouseRentShowTv4.setText(houseRentListShowInfoBean.getViewCount() + "次浏览， "+houseRentListShowInfoBean.getCollectionCount()+"人想要");

        //        2 亮点  1 配置  3 要求
        List<HouseRentListShowBean.DetailsBean> detailsBeans1 = mPresenter.getDetailsBeanByte("1", houseRentListShowInfoBean.getDetails());
        if (detailsBeans1 != null && !detailsBeans1.isEmpty()) {
            //配置
            activityHouseRentShowRecyclerView2.setLayoutManager(new GridLayoutManager(this, 5));
            activityHouseRentShowRecyclerView2.addItemDecoration(new SpaceItemDecoration(AppUtil.dp2px(2)));
            activityHouseRentShowRecyclerView2.setAdapter(new HouseRentingShowFwpzAdapter(detailsBeans1));

        } else {
            activityHouseRentShowTv17.setVisibility(View.GONE);
            activityHouseRentShowRecyclerView2.setVisibility(View.GONE);
        }

        //出租要求
        List<HouseRentListShowBean.DetailsBean> detailsBeans = mPresenter.getDetailsBeanByte("3", houseRentListShowInfoBean.getDetails());
        if (detailsBeans != null && !detailsBeans.isEmpty()) {
            activityHouseRentShowRecyclerView3.setLayoutManager(new GridLayoutManager(this, 3));
            activityHouseRentShowRecyclerView3.addItemDecoration(new SpaceItemDecoration(AppUtil.dp2px(5)));
            activityHouseRentShowRecyclerView3.setAdapter(new HouseRentingShowHeZuYqItemAdapter(detailsBeans));
        } else {
            activityHouseRentShowTv16.setVisibility(View.GONE);
            activityHouseRentShowRecyclerView3.setVisibility(View.GONE);
        }


        if (houseRentListShowInfoBean.getHouseAreaName() != null && !houseRentListShowInfoBean.getHouseAreaName().isEmpty()) {
            String temName = "";
            for (int i = 0; i < houseRentListShowInfoBean.getHouseAreaName().size(); i++) {
                if (i != houseRentListShowInfoBean.getHouseAreaName().size() - 1) {
                    temName += houseRentListShowInfoBean.getHouseAreaName().get(i).getName() + ".";
                } else {
                    temName += houseRentListShowInfoBean.getHouseAreaName().get(i).getName();
                }
            }
            activityHouseRentShowTv5.setText(temName);
        } else {
            activityHouseRentShowTv5.setText("");
        }
        activityHouseRentShowTv6.setText("距离当前位置步行约" + houseRentListShowInfoBean.getDistance() + "米");
        activityHouseRentShowRecyclerView2.setLayoutManager(new GridLayoutManager(this, 5));
        if (houseRentListShowInfoBean.getDetail() == null || houseRentListShowInfoBean.getDetail().length() < 1) {
            activityHouseRentShowExpandableTextView7.setVisibility(View.GONE);
            activityHouseRentShowTv15.setVisibility(View.GONE);
        } else {
            activityHouseRentShowExpandableTextView7.setVisibility(View.VISIBLE);
            activityHouseRentShowExpandableTextView7.setOriginalText(houseRentListShowInfoBean.getDetail());
        }

        if (glideImage == null) {
            glideImage = ArmsUtils.obtainAppComponentFromContext(this).imageLoader();
        }
        if (houseRentListShowInfoBean.getHouseImageList() != null && !houseRentListShowInfoBean.getHouseImageList().isEmpty()) {
            activityHouseRentShowBanner.setPages(houseRentListShowInfoBean.getHouseImageList(), new MZHolderCreator() {
                @Override
                public MZViewHolder createViewHolder() {
                    BannerViewHolder bannerViewHolder = new BannerViewHolder();
                    bannerViewHolder.setBaseBeans(houseRentListShowInfoBean.getHouseImageList());
                    return bannerViewHolder;
                }
            });
        }

        activityHouseRentShowImgNum.setText("1/" + houseRentListShowInfoBean.getHouseImageList().size());
        activityHouseRentShowBanner.setIndicatorVisible(false);
        activityHouseRentShowBanner.addPageChangeLisnter(new ViewPager.OnPageChangeListener() {
            @Override
            public void onPageScrolled(int i, float v, int i1) {

            }

            @Override
            public void onPageSelected(int i) {
                activityHouseRentShowImgNum.setText(i + 1 + "/" + houseRentListShowInfoBean.getHouseImageList().size());
            }

            @Override
            public void onPageScrollStateChanged(int i) {

            }
        });
        userInfoShowContral(houseRentListShowInfoBean);
        buttomContralShow(houseRentListShowInfoBean);//控制下面的按钮显示和隐藏
    }

    @Override
    public void addGzSuccess() {
        activityHouseRentShowBtn12.post(new Runnable() {
            @Override
            public void run() {
                showMessage("收藏成功");
            }
        });

        activityHouseRentShowBtn12.setLiked(true);
    }

    @Override
    public void canlSuccess() {
        activityHouseRentShowBtn12.post(new Runnable() {
            @Override
            public void run() {
                showMessage("取消成功");
            }
        });


        activityHouseRentShowBtn12.setLiked(false);
    }

    @Override
    public void delRentHouseSuccess() {
        showMessage("删除成功");
        killMyself();
    }

    @Override
    public void dictListSuccess(List<HousePayWayBean> housePayWayBeans) {
        //下架提示语
        mhousePayWayBeansXjTsY = housePayWayBeans;

    }

    @Override
    public void lowerShelfHouseRentSuccess() {
        killMyself();
        //下架成功返回上一个界面
    }

    /**
     * 显示不同信息控制
     */
    public void showDataInfo(HouseRentListShowInfoBean mhouseRentListShowInfoBean) {
        List<HouseRentListShowBean.DetailsBean> temDetailsBean = mPresenter.getDetailsBeanByte("2", mhouseRentListShowInfoBean.getDetails());
        if (temDetailsBean == null) {
            temDetailsBean = new ArrayList<>();
        }
        activityHouseRentShowRecyclerViewNew.setLayoutManager(new GridLayoutManager(this, 2));
        List<HouseRentShowInfoBean> datas = new ArrayList<>();
        datas.add(new HouseRentShowInfoBean("面积：", mhouseRentListShowInfoBean.getAcreage() + "m²"));
        String temFloor = AppUtil.showFloor(mhouseRentListShowInfoBean);

        if (mhouseRentListShowInfoBean.getRentType().equals("zz") || mhouseRentListShowInfoBean.getRentType().equals("dz") || mhouseRentListShowInfoBean.getRentType().equals("hz") || mhouseRentListShowInfoBean.getRentType().equals("bs")) {
            datas.add(new HouseRentShowInfoBean("押金：", mhouseRentListShowInfoBean.getCashPledgeName()));
            datas.add(new HouseRentShowInfoBean("楼层：", temFloor));
            datas.add(new HouseRentShowInfoBean("装修：", mhouseRentListShowInfoBean.getDecorationTypeName()));//装修
            datas.add(new HouseRentShowInfoBean("发布时间：", mhouseRentListShowInfoBean.getCreateTime().substring(0, 10)));//发布时间
        } else if (mhouseRentListShowInfoBean.getRentType().equals("sp")) {
            datas.add(new HouseRentShowInfoBean("押金：", mhouseRentListShowInfoBean.getCashPledgeName()));
            datas.add(new HouseRentShowInfoBean("房屋类型：", mhouseRentListShowInfoBean.getRentRoomName()));
            datas.add(new HouseRentShowInfoBean("楼层：", temFloor));
            datas.add(new HouseRentShowInfoBean("当前状态：", mhouseRentListShowInfoBean.getCurrentStatusName()));
            datas.add(new HouseRentShowInfoBean("原经营状态：", mhouseRentListShowInfoBean.getOriginalBusinessName()));
            if (mhouseRentListShowInfoBean.getTransferOrLease().equals("transfer")) {
                //转租
                temDetailsBean.add(0, new HouseRentListShowBean.DetailsBean("商铺转租"));
                datas.add(new HouseRentShowInfoBean("剩余租期：", mhouseRentListShowInfoBean.getResidueLease() + mhouseRentListShowInfoBean.getResidueLeaseUnit()));
                datas.add(new HouseRentShowInfoBean("转让费：", mhouseRentListShowInfoBean.getTransferFee() + "P"));
                datas.add(new HouseRentShowInfoBean("发布时间：", mhouseRentListShowInfoBean.getCreateTime().substring(0, 10)));//发布时间
            } else {
                temDetailsBean.add(new HouseRentListShowBean.DetailsBean("商铺出租"));
                datas.add(new HouseRentShowInfoBean("发布时间：", mhouseRentListShowInfoBean.getCreateTime().substring(0, 10)));//发布时间
                if (mhouseRentListShowInfoBean.getDailyRent().intValue() > 0) {
                    datas.add(new HouseRentShowInfoBean("可短租：", mhouseRentListShowInfoBean.getDailyRent().intValue() + "P/天"));//发布时间
                }
            }
        } else if (mhouseRentListShowInfoBean.getRentType().equals("bgs")) {
            //办公室
            temDetailsBean.add(0, new HouseRentListShowBean.DetailsBean("办公室"));
            datas.add(new HouseRentShowInfoBean("押金：", mhouseRentListShowInfoBean.getCashPledgeName()));
            datas.add(new HouseRentShowInfoBean("房屋类型：", mhouseRentListShowInfoBean.getRentRoomName()));
            datas.add(new HouseRentShowInfoBean("楼层：", temFloor));
            datas.add(new HouseRentShowInfoBean("可容纳工位：", mhouseRentListShowInfoBean.getAccommodationStation() + "人"));
            datas.add(new HouseRentShowInfoBean("装修：", mhouseRentListShowInfoBean.getDecorationTypeName()));//装修
            datas.add(new HouseRentShowInfoBean("分割情况：", mhouseRentListShowInfoBean.getIsSeparable() == 0 ? "不可分割" : "可分割"));//装修setIsSeparable
            datas.add(new HouseRentShowInfoBean("办公家具：", mhouseRentListShowInfoBean.getIsOfficeAppliances() == 0 ? "无" : "有"));//
            datas.add(new HouseRentShowInfoBean("发布时间：", mhouseRentListShowInfoBean.getCreateTime().substring(0, 10)));//发布时间
            if (mhouseRentListShowInfoBean.getIsSeparable() == 1) {
                temDetailsBean.add(new HouseRentListShowBean.DetailsBean("可分割"));
            }
            if (mhouseRentListShowInfoBean.getIsOfficeAppliances() == 1) {
                temDetailsBean.add(new HouseRentListShowBean.DetailsBean("带办公家具"));
            }

            if (mhouseRentListShowInfoBean.getDailyRent().intValue() > 0) {
                datas.add(new HouseRentShowInfoBean("可短租：", mhouseRentListShowInfoBean.getDailyRent().intValue() + "P/天"));//发布时间
            }
        } else if (mhouseRentListShowInfoBean.getRentType().equals("cw")) {
            //车位
            temDetailsBean.add(0, new HouseRentListShowBean.DetailsBean("车位"));
            datas.add(new HouseRentShowInfoBean("楼层：", temFloor));
            datas.add(new HouseRentShowInfoBean("发布时间：", mhouseRentListShowInfoBean.getCreateTime().substring(0, 10)));//发布时间
            if (mhouseRentListShowInfoBean.getDailyRent().intValue() > 0) {
                datas.add(new HouseRentShowInfoBean("可短租：", mhouseRentListShowInfoBean.getDailyRent().intValue() + "P/天"));//发布时间
            }
        } else {
            //仓库
            temDetailsBean.add(0, new HouseRentListShowBean.DetailsBean("仓库/厂房"));
            datas.add(new HouseRentShowInfoBean("押金：", mhouseRentListShowInfoBean.getCashPledgeName()));
            datas.add(new HouseRentShowInfoBean("楼层：", temFloor));
            if (mhouseRentListShowInfoBean.getDailyRent().intValue() > 0) {
                datas.add(new HouseRentShowInfoBean("可短租：", mhouseRentListShowInfoBean.getDailyRent().intValue() + "P/天"));//发布时间
            }
            datas.add(new HouseRentShowInfoBean("发布时间：", mhouseRentListShowInfoBean.getCreateTime().substring(0, 10)));//发布时间
        }
        activityHouseRentShowRecyclerViewNew.setAdapter(new HouseRentShowInfoAdapter(datas));
        //亮点
        activityHouseRentShowRecyclerView1.setLayoutManager(new FlowLayoutManager());
        activityHouseRentShowRecyclerView1.addItemDecoration(new SpaceItemDecoration(AppUtil.dp2px(5)));
        activityHouseRentShowRecyclerView1.setAdapter(new HouseRentingShowHeZuYqItemAdapter(temDetailsBean));
    }

    private void addWeChat() {
        ViewExtensionKt.showCenterDialog(dialogView, dialog, true);
    }

    /**
     * 控制关联店铺和没有关联店铺的时候的显示
     *
     * @param mhouseRentListShowInfoBean
     */
    public void userInfoShowContral(HouseRentListShowInfoBean mhouseRentListShowInfoBean) {
        if (mhouseRentListShowInfoBean.getUserStore() == null || mhouseRentListShowInfoBean.getUserStore().getStoreId() == null || TextUtils.isEmpty(mhouseRentListShowInfoBean.getUserStore().getStoreId())||mhouseRentListShowInfoBean.getUserStore().getIsShow()==0) {

            //没有关联店铺
            activityHouseRentShowFdxxLay.setVisibility(View.VISIBLE);
            activityHouseRentShowSpLay.setVisibility(View.GONE);
            if (mhouseRentListShowInfoBean.getAvatar()!=null&&!TextUtils.isEmpty(mhouseRentListShowInfoBean.getAvatar()))
            {
                glideImage.loadImage(this, ImageConfigImpl.builder().url(mhouseRentListShowInfoBean.getAvatar()).imageRadius(5)
                        .imageView(activityHouseRentShowHeaderImg)
                        .build());
            }else {
                activityHouseRentShowHeaderImg.setImageResource(R.drawable.default_headimage);
            }

            activityHouseRentShowTv7.setText(mhouseRentListShowInfoBean.getNickName());
            activityHouseRentShowTv9.setText("来海服" +mhouseRentListShowInfoBean.getDayCount()+"天, " + mhouseRentListShowInfoBean.getUserSex()+" ");
            activityHouseRentShowTv10.setText(((mhouseRentListShowInfoBean.getLogDiffDay() > 0 ? mhouseRentListShowInfoBean.getLogDiffDay() + "天" : (mhouseRentListShowInfoBean.getLogDiffHour() > 0 ? mhouseRentListShowInfoBean.getLogDiffHour() + "小时" : mhouseRentListShowInfoBean.getLogDiffMinute() + "分钟"))) + "前来过");

        } else {
            //已经关联店铺
            activityHouseRentShowSpLay.setVisibility(View.VISIBLE);
            activityHouseRentShowFdxxLay.setVisibility(View.GONE);
            glideImage.loadImage(this, ImageConfigImpl.builder().url(mhouseRentListShowInfoBean.getUserStore().getStoreLogo()).imageRadius(5)
                    .imageView(activitySpShowHeaderImg)
                    .build());
            activitySpNameTxt.setText(mhouseRentListShowInfoBean.getUserStore().getStoreName());

            activitySpDlImg.setText(mhouseRentListShowInfoBean.getUserStore().getStoreRankName());
            glideImage.loadImage(this, ImageConfigImpl.builder().url(mhouseRentListShowInfoBean.getMemberLevelHeadImage()).imageRadius(5)
                    .imageView(activitySpHydjImg)
                    .build());
            activitySpZxfyImg.setText("在线房源" + mhouseRentListShowInfoBean.getUserStore().getHouseRentCount() + "个");

            if (mhouseRentListShowInfoBean.getUserStore().getIsShow()==0){
                //如果店铺过期了就不显示,（1开启，0关闭）
                activityHouseRentShowSpLay.setVisibility(View.GONE);
            }
        }
    }

    /**
     * 不同界面跳转过来显示控制
     */
    public void buttomContralShow(HouseRentListShowInfoBean mhouseRentListShowInfoBean) {

        if (getIntent().hasExtra("type") && getIntent().getStringExtra("type").equals("userCenterInfo")) {
            activityHouseRentCommonLookLay.setVisibility(View.GONE);
            activityHouseRentShowJbLay.setVisibility(View.GONE);//隐藏举报
            //从个人中心我的发布跳转过来的
//            activityHouseRentShowJbLay.setVisibility(View.INVISIBLE);//举报
//            activityHouseRentShowSpLay.setVisibility(View.GONE);//店铺信息
//            houseInfoShowFywzs.setVisibility(View.GONE);//没关联店铺，显示个人的信息
//            activityHouseRentShowFdxxPublishLay.setVisibility(View.VISIBLE);// 个人信息，从我的发布进来的
//            houseInfoShowFyyxj.setVisibility(View.GONE);//房源已下架提示
//            houseInfoShowFywzs.setVisibility(View.GONE);//房源未展示提示
            activityHouseRentCommonLay.setVisibility(View.GONE);//普通用户下面的按钮
//            activityHouseRentUserCenterLay.setVisibility(View.GONE);//从用户中心过来的用户展示的底部操作按钮
            if (mhouseRentListShowInfoBean != null) {
                activityHouseRentUserCenterLay.setVisibility(View.VISIBLE);
                //请求数据后，根据数据控制展示
                if (mhouseRentListShowInfoBean.getIsAvailable() == 0) {
//                    isAvailable 0-下架，1-上架
                    //已下架

                    activityHouseRentShowTime.setVisibility(View.INVISIBLE);
                    activityHouseRentShowObt.setText(ArmsUtils.getString(this, R.string.mystory_sc));//删除
                    if (Integer.parseInt(mhouseRentListShowInfoBean.getLowerShelfTime().substring(0, 4)) < Integer.parseInt(TimeUtils.getYear())) {
                        //可以删除
                        houseInfoShowFywzs.setVisibility(View.VISIBLE);
                        houseInfoShowFywzs.setText(ArmsUtils.getString(this, R.string.house_info_fyyxj));
                        activityHouseRentUserCenterLay.setVisibility(View.VISIBLE);
                        activityHouseRentShowEdit.setVisibility(View.INVISIBLE);
                        activityHouseRentShowObt.setVisibility(View.VISIBLE);
                        activityHouseRentShowObt.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                //删除下架的
                                mPresenter.del(mhouseRentListShowInfoBean.getRentId());
                            }
                        });
                    } else {
                        //不可以删除
                        activityHouseRentCommonLay.setVisibility(View.GONE);
                        activityHouseRentUserCenterLay.setVisibility(View.GONE);
                        houseInfoShowFyyxj.setVisibility(View.VISIBLE);
                        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
                        lp.setMargins(0, 0, 0, 0);
                        scrollview.setLayoutParams(lp);
                    }
                } else if (mhouseRentListShowInfoBean.getReviewStatus() == 2 && mhouseRentListShowInfoBean.getIsExpired()== 1) {
                    //已过期的
                    houseInfoShowFywzs.setVisibility(View.VISIBLE);//房源未展示提示
                    activityHouseRentShowTime.setText(ArmsUtils.getString(this, R.string.mystory_shwtg_hygq_qsj));
                    activityHouseRentShowTime.setTextColor(ArmsUtils.getColor(this, R.color.color_ff3a3a));
                    activityHouseRentShowEdit.setText(ArmsUtils.getString(this, R.string.hf_me_sjhy));//升级会员
                    activityHouseRentShowObt.setText(ArmsUtils.getString(this, R.string.mystory_xj));//下架
                    activityHouseRentShowObt.setVisibility(View.VISIBLE);
                    activityHouseRentShowEdit.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            Intent intent = new Intent(HouseRentShowInfoActivity.this, MemberCenterMainActivity.class);
                            intent.putExtra("type", "house_updateMember");//从房屋跳转到升级会员界面
                            startActivity(intent);
                        }
                    });
                    activityHouseRentShowObt.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            mPresenter.houseReasonRemoval(HouseRentShowInfoActivity.this, activityHouseRentShowObt, mhousePayWayBeansXjTsY, new HouseReasonRemovalCallBack() {
                                @Override
                                public void callBack(HousePayWayBean housePayWayBean) {
                                    if (housePayWayBean != null) {
                                        mPresenter.lowerShelfHouseRent(mhouseRentListShowInfoBean.getRentId(), housePayWayBean.getDictId());
                                    }
                                }
                            });
                        }
                    });
                } else if (mhouseRentListShowInfoBean.getReviewStatus() == 2) {
                    //审核通过的
                    activityHouseRentShowTime.setVisibility(View.VISIBLE);
                    activityHouseRentShowEdit.setVisibility(View.VISIBLE);
                    activityHouseRentShowObt.setVisibility(View.VISIBLE);
                    activityHouseRentShowTime.setText(ArmsUtils.getString(this, R.string.mystory_shwtg_hygq_qsj));
                    activityHouseRentShowTime.setTextColor(ArmsUtils.getColor(this, R.color.color_999999));
                    activityHouseRentShowEdit.setText(ArmsUtils.getString(this, R.string.edit));//编辑
                    activityHouseRentShowObt.setText(ArmsUtils.getString(this, R.string.mystory_xj));//下架
                    activityHouseRentShowTime.setVisibility(View.GONE);

                    if (mhouseRentListShowInfoBean.getEditableTime().equals("0")) {
                        //编辑时间过了，不可以编辑了
                        activityHouseRentShowEdit.setVisibility(View.GONE);//编辑
                        activityHouseRentShowTime.setVisibility(View.GONE);//提示

                    } else {
                        activityHouseRentShowTime.setText(TimeUtils.getTime(mhouseRentListShowInfoBean.getEditableTime()) + "后禁止编辑");
                        activityHouseRentShowEdit.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                //编辑
                            }
                        });
                    }

                    activityHouseRentShowObt.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            mPresenter.houseReasonRemoval(HouseRentShowInfoActivity.this, activityHouseRentShowObt, mhousePayWayBeansXjTsY, new HouseReasonRemovalCallBack() {
                                @Override
                                public void callBack(HousePayWayBean housePayWayBean) {
                                    if (housePayWayBean != null) {
                                        mPresenter.lowerShelfHouseRent(mhouseRentListShowInfoBean.getRentId(), housePayWayBean.getDictId());
                                    }
                                }
                            });
                        }
                    });
                }


                return;
            }
        } else {
            //正常浏览记录过来的
            activityHouseRentCommonLookLay.setVisibility(View.VISIBLE);
            activityHouseRentShowJbLay.setVisibility(View.VISIBLE);//举报

            activityHouseRentShowFdxxPublishLay.setVisibility(View.GONE);// 个人信息，从我的发布进来的
            houseInfoShowFyyxj.setVisibility(View.GONE);//房源已下架
            houseInfoShowFywzs.setVisibility(View.GONE);//房源未展示
            activityHouseRentCommonLay.setVisibility(View.VISIBLE);//普通用户下面的按钮
            activityHouseRentUserCenterLay.setVisibility(View.GONE);//从用户中心过来的用户展示的底部操作按钮

        }
    }

}

